<!--资源确认-->
<template>
  <t-collapse title="项目验收信息">
    <TForm ref="enteringForm" :form="formData" :form-options="formOptions" :rules="rules" />
    <accButton v-if="hqType" :prj-id="prjId" :btn-list="btnOptions" />
  </t-collapse>
</template>
<script>
import TForm from '../form/index.vue'
import accButton from '@/views/acceptance/components/accButton.vue'
import { Mixins } from '@/views/acceptance/components/minix'
export default {
  components: {
    accButton,
    TForm
  },
  mixins: [Mixins],
  data() {
    return {
      _btnList: ['serviceShow', 'materialAffirm', 'costSheet', 'maintain', 'panorama'],
      formList: ['realStartTime', 'realEndTime', 'endInternalAcceptDate', 'jiaofuApplicationDate', 'endInstallDate', 'resourceInTime', 'resourceConfirmTime', 'maintainDate']
    }
  },
  computed: {
    // 服务成本 设备录入
    noSbLr() {
      return this.newPrjDetail.prjType === 'W' && this.newPrjDetail.buildModes === '26'
    },
    // 维护改造
    getShowOneNew(){
      return this.newPrjDetail.isNewBusiness === '0'&&this.newPrjDetail.businessMajor==='04'
    },
    btnList() {
      console.log(`${this.newPrjDetail.isMaintain === '1' ? '有' : '无'}交维`, `${this.newPrjDetail.ifNewStartupProcess === '1' ? '无' : '有'}实施`, '[]')
      // 智联没有
      if (this.newPrjDetail.isNewBusiness === '1'||this.getShowOneNew) {
        const list = ['serviceShow', 'materialAffirm', 'costSheet', 'panorama']
        return this.noSbLr ? list.filter(item => item != 'costSheet') : list
      } else {
        return ['serviceShow', 'materialAffirm', 'costSheet', 'maintain', 'panorama']
      }
    }
  }
}
</script>
<style scoped lang='scss'></style>
